#include <iostream>

using namespace std;

class Person {
public:
	Person(const string& n):name(n) {
	}	
	virtual void Display()=0;
private:
	string name;
};

class Teacher:public Person {
public:
	Teacher(const string& n):Person(n) {
	}
	void Display() {
		cout << "I am a teacher!" << endl;
	} 
};

class Student:public Person {
public:
	Student(const string& n):Person(n) {
	}
	void Display() {
		cout << "I am a student!" << endl;
	} 
};

int main() {
	Person* p1 = new Teacher("Lee"), *p2 = new Student("li");
	p1->Display();
	p2->Display();
	return 0;	
}
